<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>组权限设置</title>
<link type="text/css" rel="stylesheet" href="main.css"/>
<script src="jquery.js" language="javascript" type="text/javascript"></script>
<script src="base.js" language="javascript" type="text/javascript"></script>

</head>
<body>
<div class="mtitle">
  <div class="lbox">组权限设置</div>
</div>
<center>
<table class="tform">
  <tbody>
    <tr>
      <td align="left"><b><a href='sys_group.php'>系统用户组管理</a>&gt;&gt;更改用户组：</b></td>
      <td align="right"></td>
    </tr>
  </tbody>
</table>
<table _dlist="line" class="tlist">
<form name='form1' action='sys_group_edit.php' method='post'> 
<input type='hidden' name='dopost' value='save'>
 <tbody>
  <tr> 
    <td valign="top" bgcolor="#FFFFFF" align="center"> 
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="9%" height="30">组名称：</td>
          <td width="91%"> <input name="typename" type="text" class="txt" id="typename" value="<?php echo $groupSet['typename']?>"> 
          </td>
        </tr>
        <tr> 
          <td width="9%" height="30">级别值：</td>
          <td width="91%">
          	<input name="rank" type="hidden" id="rank" value="<?php echo $groupSet['rank']?>">
          	<?php echo $groupSet['rank']?>
          </td>
        </tr>
        <?php
        $start = 0;
        $k = 0;
        $gouplists = file(DEDEADMIN.'/inc/grouplist.txt');
        foreach($gouplists as $line)
        {
        	$line = trim($line);
        	if($line=="") continue;
        	if(ereg("^>>",$line))
        	{
        		if($start>0) echo "        	 </td></tr>\r\n";
        		$start++;
        		$lhead = "
        	 <tr> 
           <td height='25' colspan='2' bgcolor='#F9FAF3'>{$start}、".str_replace('>>','',$line)."</td></tr>
           <tr><td height='25' colspan='2' style='line-height:22px'>
        		"; 
        		echo $lhead;
        	}
        	else if(ereg("^>",$line))
        	{
        		$ls = explode('>',$line);
        		$tag = $ls[1];
        		$tagname = str_replace('[br]','<br>',$ls[2]);
        		echo "          	<input name='purviews[]' type='checkbox' class='np' id='purviews$k' value='$tag'".CRank($tag)."><label for='purviews$k'>$tagname</label>\r\n";
        	  $k++;
        	}
        }
        $start++;
        ?>
        </td>
        </tr>
        <tr> 
           <td height='25' colspan='2' bgcolor='#F9FAF3'><?php echo $start?>、插件权限</td>
         </tr>
        <tr>
        <td height='25' colspan='2' style='line-height:22px'>
         <?php
         $l = 0;
         $dsql->SetQuery('Select plusname From #@__plus');
         $dsql->Execute();
         while($row=$dsql->GetObject()){
         	 echo "          	<input name='purviews[]' type='checkbox' class='np' id='purviews$k' value='plus_{$row->plusname}'".CRank("plus_{$row->plusname}")."><label for='purviews$k'>{$row->plusname}</label>\r\n";
        	 $k++;
        	 $l++;
        	 if($l%4==0) echo "<br>";
         }
         ?>  	
        </td>
        </tr>
        <tr> 
          <td height="50" align="center">&nbsp;</td>
          <td height="50">
          <button type="submit"class="btn1s">保存</button>
          </td>
        </tr>
      </table>
    </td>
</tr>
</tbody>
</form>
</table>
</center>
</body>
</html>